package cn.dida.model;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * 响应报文包装类
 * @author weiwei
 */
public class HttpResponseBodyWrapper {
    private Integer code;
    private Object data;
    private String msg;
    private Object debug;

    private Log loger = LogFactory.getLog(HttpResponseBodyWrapper.class);

    public HttpResponseBodyWrapper(Integer code, Object data, String msg) {
        this.code = code;
        this.data = data;
        this.msg = msg;
        if(1!=code){
        	  loger.warn("警告："+code+";"+msg);
        }
      
    }

    public HttpResponseBodyWrapper(Object data) {
        this(1, data, "success");
    }

    public HttpResponseBodyWrapper(Object data, String msg) {
        this(1, data, msg);
    }


    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getDebug() {
        return debug;
    }

    public void setDebug(Object debug) {
        this.debug = debug;
    }
}
